﻿using System;

class SumNAndX
{
    static void Main()
    {
        Console.WriteLine("Enter an integer N:");
        int N = int.Parse(Console.ReadLine());
        Console.WriteLine("Enter an integer X:");
        int X = int.Parse(Console.ReadLine());
        double SUM = 1;
        double fact = 1;
        for (int i = 1; i <= N; i++)
        {
            SUM += ((fact *= i) / (Math.Pow(X, i)));
        }
        Console.WriteLine(SUM);
    }
}

